home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / pine394.zip / doc / mailcap.unx < prev    next >
Text File  |  1996-04-12  |  7KB  |  127 lines

  1. # This is a sample mailcap file based on the sample mailcap file
  2. # contained in the metamail distribution (version 2.7) from Bellcore.
  3. # This sample is for a Unix system.  Look at the original sample from
  4. # the metamail distribution for more ideas.  This is a simplified version
  5. # to explain how it works with Pine.  As of October, 1994, metamail was
  6. # available via anonymous ftp from the host thumper.bellcore.com in the
  7. # file /pub/nsb/mm2.7.tar.Z.
  8. #
  9. # Metamail is:
  10. # Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
  11. # Permission to use, copy, modify, and distribute this material 
  12. # for any purpose and without fee is hereby granted, provided 
  13. # that the above copyright notice and this permission notice 
  14. # appear in all copies, and that the name of Bellcore not be 
  15. # used in advertising or publicity pertaining to this 
  16. # material without the specific, prior written permission 
  17. # of an authorized representative of Bellcore.  BELLCORE 
  18. # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
  19. # OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
  20. # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
  21. #
  22. # The mailcap viewers are used by Pine when viewing pieces of a message
  23. # from within the attachment viewer.  That is, you type the "V" command
  24. # when already viewing a message.
  25. #
  26. # Pine expects the mailcap file to be in /etc/mailcap on Unix systems.
  27. # Users may override or extend this with a .mailcap file in their home
  28. # directory.  The contents of that will be combined with /etc/mailcap.
  29. # Users may override this standard Pine mailcap path
  30. # ("~/.mailcap:/etc/mailcap") by defining the environment variable
  31. # MAILCAPS to be equal to the colon separated path.
  32. #
  33. # On PC's (DOS or Windows) the file MAILCAP is searched for first in the
  34. # same directory where the user's PINERC is located and then in the same
  35. # directory where PINE.EXE is located.  The first would be the user's personal
  36. # override file and the second the common file used by all users.   Users
  37. # may override this location by defining the environment variable MAILCAPS
  38. # to be equal to the *semicolon* separated path.
  39. #
  40. # Pine does not use the "compose=" portion of mailcap entries (and doesn't
  41. # provide a general method of composing different types of messages).
  42. # Pine doesn't pay attention to "copiousoutput", but always pipes the output
  43. # to its standard scrolling text window if "needsterminal" is not set.
  44. # If "needsterminal" is set, then Pine sets the terminal or terminal window
  45. # back to the state it was in when Pine was started and lets the viewer run.
  46. # When the viewer finishes, Pine resets the terminal and redraws the screen.
  47. # If any user interaction with the viewer is required and the viewer runs
  48. # in the same terminal window as Pine, then "needsterminal" should be set.
  49. # The "test=" commands are used as defined in RFC1524, except that the
  50. # data file is not available to the test command.
  51. #
  52. # Since mailcap is only used from the attachment viewer, the message being
  53. # viewed will always be a single part, so "multipart" entries in mailcap have
  54. # no effect on Pine.  Type "text/plain" with "charset=usascii" or charset
  55. # matching the character-set variable are intercepted and displayed by Pine
  56. # in the normal way, not displayed by a mailcap viewer.  Besides those
  57. # exceptions just listed, all other types and subtypes are subject to
  58. # being displayed by a mailcap viewer.  If no match is found for types text
  59. # or message, Pine will display them in its usual way.
  60. #
  61. # As a special case, the "image-viewer" variable from the pinerc file is
  62. # supported as if an extra entry for type image/* came first in the
  63. # personal mailcap file.  That's for backwards compatibility.
  64. #
  65. #
  66. # The following line causes the xv program to be used to display all
  67. # image types if the DISPLAY variable is set (indicating the user is
  68. # using X).  (xv is written by John Bradley, bradley@cis.upenn.edu.  There
  69. # are also other X image viewer programs you could use, such as xloadimage.)
  70. image/*; xv %s; test=test -n "$DISPLAY"
  71.  
  72. # The effect of the following is to send ALL audio subtypes to the 
  73. # showaudio program.  If possible, it would be desirable to also include
  74. # a test command that could decide whether or not the user could play audio.
  75. # That would be something like "test=can_do_audio %t".  (Showaudio is a shell
  76. # script included in the metamail distribution.)
  77. audio/*; showaudio %s
  78.  
  79. # (Showexternal is a shell script included in the metamail distribution.)
  80. message/external-body; showexternal %s %{access-type} %{name} \
  81.     %{site} %{directory} %{mode} %{server}; \
  82.     needsterminal; composetyped = extcompose %s; \
  83.     description="A reference to data stored in an external location"
  84.  
  85. # If you have an interactive Postscript interpreter, you should think carefully 
  86. # before replacing lpr with it in the following line, because PostScript
  87. # can be an enormous security hole.  It is RELATIVELY harmless
  88. # when sent to the printer...
  89. application/postscript ; lpr %s \; echo SENT FILE TO PRINTER ;\
  90.     description="A Postscript File";
  91. # unsafe alternative
  92. #application/postscript; gspreview %s ;  test=test -n "$DISPLAY"
  93.  
  94. # The following gives rudimentary capability for receiving 
  95. # text mail in the ISO-8859-1 character set, which covers many European 
  96. # languages, and the ISO-8859-8 character set, which includes Hebrew
  97. # Note that the pipe to tr ensures that the "ISO" is case-insensitive.
  98. # (This is also from metamail.)
  99. text/plain; shownonascii iso-8859-8 %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-8 -a -n "$DISPLAY" ; copiousoutput
  100. text/plain; shownonascii iso-8859-8 %s | more ; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-8; needsterminal
  101. text/plain; shownonascii iso-8859-1 %s; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-1 -a -n "$DISPLAY" ; copiousoutput
  102. text/plain; shownonascii iso-8859-1 %s | more ; test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-8859-1 ; needsterminal
  103.  
  104. # The following displays Japanese text at sites where
  105. # the "kterm" program is installed:
  106. text/plain; kterm -geometry +0+0 -e more %s /dev/null; \
  107.     test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" = iso-2022-jp
  108.  
  109. # This maps MPEG video data to the viewer 'mpeg_play'.
  110. # (Mpeg_play is part of the MPEG distribution from The Berkeley Plateau
  111. # Research Group and is available via anonymous ftp from toe.cs.berkeley.edu.)
  112. video/mpeg; mpeg_play %s ; test=test -n "$DISPLAY"
  113.  
  114. # This maps all other types of video to the xanim viewer.  (Xanim is written
  115. # by Mark Podlipec, podlipec@wellfleet.com.)
  116. video/*; xanim %s ; test=test -n "$DISPLAY"
  117.  
  118. # The xdvi program display TeX dvi files on an X server.
  119. application/x-dvi; xdvi %s ;  test=test -n "$DISPLAY"
  120.  
  121. # Type octet-stream (binary) data can be displayed as a hex dump before
  122. # you decide whether or not you want to save it to a file.  (Hd is just
  123. # a standard hex dump program.  You could use "od" if you don't have an
  124. # "hd".  Naive users may find the output from this entry confusing.)
  125. application/octet-stream; hd; copiousoutput; description="Hex dump of data"
  126.